<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    .rotate {
            width: 300px;
            height: 200px;
            background-color: aqua;
            transition: transform 3s;
        }
        
        .rotate:hover {
            transform: rotate(50deg)
        }
        
        .rotate-x {
            width: 200px;
            height: 100px;
            background-color: red;
            /* transform: rotateX(20deg); */
            transition: transform 3s;
        }
    }
    .rotate-x：hover {
        transform: rotate-x(50deg)
    }
    </style>
</head>

<body>
    <div class="rotate"></div>
    <div class="rotate-x"></div>
</body>

</html>